package workexp.testhash;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author zhukai
 *
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class PushServer {
	private String serverAddress;
	private Long customerCount;

	@Override
	public int hashCode() {
		int result = serverAddress != null ? serverAddress.hashCode() : 0;
		Object obj = new Object();
		obj.toString();
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof PushServer) {
			PushServer c = (PushServer) obj;
			return serverAddress.equals(c.getServerAddress());
		}
		return false;
	}
}
